package com.cctv.fmaed.module.redis.memory.utils;

import org.apache.commons.lang3.RandomStringUtils;

import java.util.UUID;

/**
 * 随机工具类
 *
 * @author heyingcheng
 * @since 2023/8/30
 */
public class RandomUtils {

    private RandomUtils() {
        throw new IllegalStateException("Utility class");
    }

    public static String getCode() {
        return (UUID.randomUUID().toString() + "-" + RandomStringUtils.randomAlphabetic(12)).toUpperCase();
    }

    public static String getCode(String prefix) {
        return prefix + getCode();
    }

    public static String getSecretKey() {
        return UUID.randomUUID().toString().toUpperCase();
    }

    public static String getGuid() {
        return getCode();
    }

    public static String getMessageId() {
        return  getCode("MESSAGEID-");
    }

    public static String getWssId() {
        return getCode("WSSID-");
    }

}
